Robert_d1968
Members-
Posts
82 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Robert_d1968's Achievements
Newbie (1/14)
4
Reputation
-
Whats the best linux distro for 3D development and C/C++ programming?
Robert_d1968 replied to Vida Marcell's topic in Linux
But it is poor against viruses and what not. !!! Robert -
I can't find ultra app kit on steam, I did purchase this from you site, but I can't find the license key on your site. Robert Lee Dunn
-
Wow, very nice indeed. Robert
-
Ultra App Kit 1.1 beta with Linux and Mac support
Robert_d1968 replied to Josh's topic in General Discussion
Cool, I want to try the linux version out, I'm running on Ubuntu Linux right now, can't wait for it to come out. Although steam does not seem to run on this version. Robert -
Make sure your Leadwerks project is using the discrete GPU
Robert_d1968 replied to Josh's topic in Programming
I'm going to switch to Linux, I just can't stand Windows any longer. Will the newer platforms run under linux? Robert -
So now, my programs name is Ultra App Kit instead of Ultra Engine. Are you merging them? Robert PS. is there any game made with this as of yet? If so I would like to see some source code as I learn faster from that.
-
-
-
What is with Visual C++? there is no object oriented window in the program that I can find... I about ready to create libraries in XOJO to support my programming in Xojo it is object oriented programming in ever aspect of it. This way I can make cool games with it. Robert
-
Thank you sir, I shall try that out. should do me some good. Robert
-
Hey, thank you for that code it did draw the Triangle as it should. But I did not notice a difference with the buttons, I will check it again.. Robert
-
when I place the code here: while (true) { auto err = glGetError(); if (err != 0) Print(err); //Check for events const Event ev = WaitEvent(); switch (ev.id) { case EVENT_WINDOWPAINT: if (ev.source == subwindow) { iVec2 sz = subwindow->ClientSize(); glViewport(0, 0, sz.x, sz.y); glClearColor(0.15f, 0.15f, 0.15f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glBegin(GL_TRIANGLES); glColor3f(1, 0, 0); glVertex3f(0, 0.5, 0); glColor3f(0, 1, 0); glVertex3f(0.5, -0.5, 0); glColor3f(0, 0, 1); glVertex3f(-0.5, -0.5, 0); glEnd(); auto err = glGetError(); // if (err != 0) Print(err); // SwapBuffers(hdc); } break; case EVENT_WINDOWCLOSE: if (ev.source == window) return 0; break; } } return 0; } I get nothing in the console and nothing printed where the graphics should be drawn. Robert
-
Not on the second window no, but on the first window I got a code of 1282 in the debug console. Robert
-
This was the code from it: #include "UltraEngine.h" using namespace UltraEngine; #include <GL/GL.h> #pragma comment (lib, "opengl32.lib") bool ResizeViewport(const Event& ev, shared_ptr<Object> extra) { if (ev.id == EVENT_WINDOWSIZE) { auto window = ev.source->As<Window>(); iVec2 sz = window->ClientSize(); auto subwindow = extra->As<Window>(); subwindow->SetShape(200 + 1, 8 + 1, sz.x - 200 - 8 - 2, sz.y - 16 - 2); } return true; } int main(int argc, const char* argv[]) { //Get the available displays auto displays = ListDisplays(); //Create a window auto window = CreateWindow("OpenGL Example", 0, 0, 800, 600, displays[0], WINDOW_TITLEBAR | WINDOW_RESIZABLE); //Create user interface auto ui = CreateInterface(window); iVec2 sz = ui->root->ClientSize(); auto treeview = CreateTreeView(8, 8, 200 - 16, sz.y - 16, ui->root); treeview->SetLayout(1, 0, 1, 1); treeview->root->AddNode("Object 1"); treeview->root->AddNode("Object 2"); treeview->root->AddNode("Object 3"); auto panel = CreatePanel(200, 8, sz.x - 200 - 8, sz.y - 16, ui->root, PANEL_BORDER); panel->SetLayout(1, 1, 1, 1); panel->SetColor(0.15, 0.15, 0.15, 1); //Create viewport window auto subwindow = CreateWindow("", 200 + 1, 8 + 1, sz.x - 200 - 8 - 1, sz.y - 16 - 1, window, WINDOW_CHILD); //Adjust the viewport size when main window resized ListenEvent(EVENT_WINDOWSIZE, window, ResizeViewport, subwindow); //Initialize OpenGL context HWND hwnd = subwindow->GetHandle(); HDC hdc = GetDC(hwnd); PIXELFORMATDESCRIPTOR pfd = { sizeof(PIXELFORMATDESCRIPTOR), 1, PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER, // Flags PFD_TYPE_RGBA, // The kind of framebuffer. RGBA or palette. 32, // Colordepth of the framebuffer. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, // Number of bits for the depthbuffer 8, // Number of bits for the stencilbuffer 0, // Number of Aux buffers in the framebuffer. PFD_MAIN_PLANE, 0, 0, 0, 0 }; if (SetPixelFormat(hdc, 1, &pfd) == 0) RuntimeError("SetPixelFormat() failed."); HGLRC glcontext = wglCreateContext(hdc); if (glcontext == NULL) RuntimeError("wglCreateContext() failed."); wglMakeCurrent(hdc, glcontext); while (true) { //Check for events const Event ev = WaitEvent(); switch (ev.id) { case EVENT_WINDOWPAINT: if (ev.source == subwindow) { iVec2 sz = subwindow->ClientSize(); glViewport(0, 0, sz.x, sz.y); glClearColor(0.15f, 0.15f, 0.15f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glBegin(GL_TRIANGLES); glColor3f(1, 0, 0); glVertex3f(0, 0.5, 0); glColor3f(0, 1, 0); glVertex3f(0.5, -0.5, 0); glColor3f(0, 0, 1); glVertex3f(-0.5, -0.5, 0); glEnd(); SwapBuffers(hdc); } break; case EVENT_WINDOWCLOSE: if (ev.source == window) return 0; break; } } return 0; }