Ian Murphy

Members
  • Content count

    5
  • Joined

  • Last visited

Community Reputation

106 Neutral

About Ian Murphy

  • Rank
    Newbie
  1. OpenGL GUI strategy for OpenGL with .NET

      Yeah I was talking about creating GUI's inside an OpenGL graphics space. But now that I think about it, hosting the OpenGL control inside a WPF GUI might be enough.
  2. I'm currently learning OpenGL.  I'm a .NET programmer and I'm wondering if there's a good toolkit, API, add on, or other for building GUIs in OpenGL that will work well with .NET without massive effort?   Any suggestions or advice would be helpful.
  3. OpenGL New to OpenGL, some issues

    I think you are right.  I've done some experimenting and it seems that is what is happening.  I'll figure out why.   Thanks!
  4. I am new to OpenGL (and graphics programming in general).   I am working through Daniel Schuller's 'C# Game Programming for Serious Game Creation'.   Some of the examples in the book are not behaving the way the book indicates.  I want to figure out if I am doing something wrong or the book is.   I have a simple rotating triangle method:               float width=0.5;             Gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);             Gl.glClear(Gl.GL_COLOR_BUFFER_BIT);             Gl.glPointSize(5.0f);               Gl.glRotated(_currentRotation, 0, 1, 0);             Gl.glBegin(Gl.GL_TRIANGLE_STRIP);             {                 Gl.glColor4d(1.0, 0.0, 0.0, 0.5);                 Gl.glVertex3d(-width, 0, 0);                 Gl.glColor3d(0.0, 1.0, 0.0);                 Gl.glVertex3d(width, 0, 0);                 Gl.glColor3d(0.0, 0.0, 1.0);                 Gl.glVertex3d(0, width, 0);             }             Gl.glEnd();             Gl.glFinish();       I also have a Setup2DGraphics function that gets called on startup and everytime the host form changes size:           private void Setup2DGraphics(double width, double height)         {             Gl.glViewport(0, 0, (int)width, (int)height);             double halfWidth = width / 2;             double halfHeight = height / 2;             Gl.glMatrixMode(Gl.GL_PROJECTION);             Gl.glLoadIdentity();             Gl.glOrtho(-halfWidth, halfWidth, -halfHeight, halfHeight, -100, 100);             Gl.glMatrixMode(Gl.GL_MODELVIEW);             Gl.glLoadIdentity();           }     The problem I am having is that no matter what size I change the form to, it seems like the Triangle is being drawn to an openGL space that is -1,1,-1,1.   That is, if I set width on the triangle to 0.5, then I get a triangle that stretches up, left and right half the viewport size.   My understanding (and the way the book presents it) is that if I'm passing in the height and width of the form to Setup2DGraphics function, (using ClientSize.Height and ClientSize.Width properties), that glOrtho will essentially make a 1:1 mapping between the viewport and my form.  But that is not happening.  No matter the size of the form, the triangle scales to the window size even as the width stays constant at 0.5.  If I make width, say, 50, then it stretches vastly off the viewport.   So what am I missing/doing wrong here?   Thanks in advance!
  5. I am a very experienced, engineering trained programmer.  I'm also an avid gamer and intend to devote serious time and effort to developing a game idea I've wanted to do for some time.   I thought I would list what I bring to the table, as well as requirements for my idea, and get feedback on what would be the most logical tools and approach going forward:   Skill set: ----------- Very experienced in C# and .NET, SQL, XML and related technologies, multi-user, real time applications, web services, windows forms, source control systems, build systems, etc... Some experience with Java, JavaScript, and other random languages   What tools I have access to: ----------- Full MSDN license.  Multiple windows machines, iPad (no Mac as yet, but assume I'll get one eventually assuming I port to iOS), XBox, eventually XBox One, Windows Phone, will likely get an Android device eventually.   Game requirements ----------- What I plan on making is a relatively slow moving tactical/strategy game.  Will likely be real time but not in the RTS vein.  Will design leaving hooks for multiplayer but focus will be single player to start. Basic graphics.  No true 3d though perhaps some 3d objects in 2d space. Ideally would like to work in an environment that would allow porting to mobile devices, but initially most interested in PC platform.   I'm currently learning OpenGL/OpenTK basics and working through Daniel Schuller's C# Game Programming for Series Game Creation book, which is a little dated but does discuss a number of game development topics.       Questions ----------- Is it worth continuing on the course I am on? Should I be deep-diving into something like Unity right away or is it unnecessary given my requirements? Are their other frameworks I should be looking at?  I have taken a look at Mono Game but its unclear given the depreciation of XNA as to whether this is worth the time and effort.   Thanks for the help.