Skip to content

Commit e82c624

Browse files
committed
stuff
1 parent 83639f2 commit e82c624

1 file changed

Lines changed: 0 additions & 86 deletions

File tree

src/ruisapp/glue/windows/window.cxx

Lines changed: 0 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -168,63 +168,13 @@ native_window::opengl_context_wrapper::opengl_context_wrapper(
168168
graphics_api_version.minor,
169169
WGL_CONTEXT_PROFILE_MASK_ARB,
170170
WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
171-
//WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB,
172171
0 // terminate the list
173172
};
174173

175174
HGLRC hrc = display.wgl_procedures.wgl_create_context_attribs_arb(device_context.context,//
176175
shared_context,
177176
rendering_context_attribs.data());
178177

179-
//static PIXELFORMATDESCRIPTOR pfd = {
180-
// sizeof(PIXELFORMATDESCRIPTOR),
181-
// 1, // Version number of the structure, should be 1
182-
// PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER,
183-
// BYTE(PFD_TYPE_RGBA),
184-
// BYTE(utki::byte_bits * 4), // 32 bit color depth
185-
// BYTE(0),
186-
// BYTE(0),
187-
// BYTE(0),
188-
// BYTE(0),
189-
// BYTE(0),
190-
// BYTE(0), // color bits ignored
191-
// BYTE(0), // no alpha buffer
192-
// BYTE(0), // shift bit ignored
193-
// BYTE(0), // no accumulation buffer
194-
// BYTE(0),
195-
// BYTE(0),
196-
// BYTE(0),
197-
// BYTE(0), // accumulation bits ignored
198-
// window_params.buffers.get(ruisapp::buffer::depth) ? BYTE(utki::byte_bits * 2)
199-
// : BYTE(0), // 16 bit depth buffer
200-
// window_params.buffers.get(ruisapp::buffer::stencil) ? BYTE(utki::byte_bits) : BYTE(0),
201-
// BYTE(0), // no auxiliary buffer
202-
// BYTE(PFD_MAIN_PLANE), // main drawing layer
203-
// BYTE(0), // reserved
204-
// 0,
205-
// 0,
206-
// 0 // layer masks ignored
207-
//};
208-
209-
//int pixel_format = ChoosePixelFormat(
210-
// device_context.context, //
211-
// &pfd
212-
//);
213-
//if (!pixel_format) {
214-
// throw std::runtime_error("Could not find suitable pixel format");
215-
//}
216-
217-
//if (!SetPixelFormat(
218-
// device_context.context, //
219-
// pixel_format,
220-
// &pfd
221-
// ))
222-
//{
223-
// throw std::runtime_error("Could not set pixel format");
224-
//}
225-
226-
//auto hrc = wglCreateContext(device_context.context);
227-
228178
if (hrc == NULL) {
229179
DWORD error_code = GetLastError();
230180

@@ -263,44 +213,8 @@ native_window::opengl_context_wrapper::opengl_context_wrapper(
263213
error_code, ": ", error_message );
264214
throw std::runtime_error(
265215
std::move(message));
266-
267-
268-
269-
//LPVOID msg_buf;
270-
271-
//const char* error_message = "no info";
272-
273-
//if (FormatMessage(
274-
// FORMAT_MESSAGE_ALLOCATE_BUFFER |
275-
// FORMAT_MESSAGE_FROM_SYSTEM |
276-
// FORMAT_MESSAGE_IGNORE_INSERTS,
277-
// NULL,
278-
// error_code,
279-
// MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
280-
// (LPTSTR) &msg_buf, // TODO: static_cast?
281-
// 0,
282-
// NULL) == 0) {
283-
// error_message="message format failed";
284-
//}
285-
//else {
286-
// error_message = (LPCTSTR)msg_buf;// TODO: static_cast?
287-
//}
288-
289-
//utki::scope_exit msg_buf_scope_exit([&]() {
290-
// LocalFree(msg_buf);
291-
//});
292-
293-
//auto message = utki::cat("Failed to create OpenGL rendering context, error = ", //
294-
// error_code, ": ", error_message );
295-
//throw std::runtime_error(
296-
// std::move(message));
297216
}
298217

299-
//if(shared_context != NULL){
300-
// wglShareLists(hrc, //
301-
// shared_context);
302-
//}
303-
304218
return hrc;
305219
}())
306220
{}

0 commit comments

Comments
 (0)