Jump to content
  • Advertisement
Sign in to follow this  
Kiryn

OpenGL wxWidgets DirectX

This topic is 4194 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Sorry, I couldn't figure out if this will be the right forum for this question. If its not my bad. I wanna use wxWidgets with DirectX instead of win32 api. And I cannot find nothing on using wxWidgets with DirectX. I asked on their forum and nobody seems to help with it unless its DirectShow part of it. Which I have no use for right now. Or they will tell you to go use OpenGL cause its multi-platform and all that garbage and I get tired of hearing it. Not that OpenGL is bad, its just not for me.

Share this post


Link to post
Share on other sites
Advertisement
You do it just the same way you would with Win32, except you use wxWindow::GetHWND() to get a result which you can cast to a HWND object, which you use to create your devices.

Share this post


Link to post
Share on other sites
Yeah, I had gotten it to load DirectX and render the scene but it doesn't loop. It only renders it once and thats it.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kiryn
Yeah, I had gotten it to load DirectX and render the scene but it doesn't loop. It only renders it once and thats it.


Does it exit your game loop or does it just stop rendering. Do you catch any exceptions? Also does the debug runtime print any errors? Try setting a breakpoint at the start or end of your game loop to make sure it actually loops and don't get caught in some infinite loop within another function.

I don't see how wxWidgets could be the cause of this, so I suggest using some regular debugging techniques to find the problem. If you give us some more info on the problem and maybe some code we might be able to help you.

Share this post


Link to post
Share on other sites
you can use the idle event:

EVT_IDLE(gjWindowRender::OnIdle)

then:

void WindowRender::OnIdle(wxIdleEvent& event)
{
UpdateAndRender();

event.RequestMore();
}

RequestMore() means, once all windows messages have been processed by wxWidgets it will generate an idle event again, and so on.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!