Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

141 Neutral

About Mike

  • Rank

Personal Information

  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I resolved my problem. It turns out I was calling setEGLConfigChooser(false) elsewhere in my code which tells the view to choose a configuration that is as close to 16 bit RGB as possible with or without a depth buffer. That "false" was causing the view to use a configuration that had no depth buffer.
  2. The following code (at the end of the onDrawFrame method) returns 16: int[] depth = new int[10]; gl.glGetIntegerv(GL10.GL_DEPTH_BITS, depth, 0); So I'm assuming that the depth buffer exists. At the beginning of the onSurfaceCreated method the following line is used to enable depth testing: gl.glEnable(GL10.GL_DEPTH_TEST); From what I've found on the Internet, that is all that is needed to enable the depth buffer when using OpengGL ES; however, I'm clearly missing something. I just can't figure out what.
  3. I'm working on getting started on Anroid development; however, I'm having a problem with the depth buffer I cannot figure out. picture: code: public void onSurfaceCreated( GL10 gl, EGLConfig eglConfig ) { gl.glEnable(GL10.GL_DEPTH_TEST); gl.glDepthFunc( GL10.GL_LEQUAL ); gl.glMatrixMode(GL10.GL_PROJECTION); float size = .01f * (float) Math.tan(Math.toRadians(45.0) / 2); float ratio = _width / _height; // perspective: gl.glFrustumf(-size, size, -size / ratio, size / ratio, 0.01f, 100.0f); // orthographic: //gl.glOrthof(-1, 1, -1 / ratio, 1 / ratio, 0.00f, 200.0f); gl.glViewport(0, 0, (int) _width, (int) _height); gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glClearColor(0f, 0f, 0f, 1.0f); gl.glEnable(GL10.GL_CULL_FACE); gl.glFrontFace(GL10.GL_CCW); gl.glCullFace(GL10.GL_BACK); gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); gl.glEnableClientState(GL10.GL_COLOR_ARRAY); initTriangle(); } public void onDrawFrame(GL10 gl) { gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glVertexPointer(3, GL10.GL_FLOAT, 0, _vertexBuffer); gl.glColorPointer(4, GL10.GL_FLOAT, 0, _colorBuffer); for (int i = 1; i <= 3; i++) { gl.glLoadIdentity(); gl.glTranslatef(0.0f, -1.0f, -1.0f + (-1.5f*i)); // set rotation gl.glRotatef(_xAngle, 1f, 0f, 0f); gl.glRotatef(_yAngle, 0f, 1f, 0f); gl.glDrawElements(GL10.GL_TRIANGLES, _nrOfVertices, GL10.GL_UNSIGNED_SHORT, _indexBuffer); } int[] depth = new int[10]; gl.glGetIntegerv(GL10.GL_DEPTH_BITS, depth, 0); }
  4. I'm developing an ActiveX control that will be used on a large Intranet. I cannot gaurentte that DirectX 9 will be installed on the PC accessing the website hosting the ActiveX control. For this reason, I decided to use GDI+; however, I'm find that it is not fast enough for what we need. In an effort to centralize all of the files the ATL ActiveX control needs, I stored all of the images as resources in the module. The application uses PNGs for the transparency they offer and I've written code to load the PNG files from the resource into a GDI+ bitmap object. If I'm going to switch over to DirectX, I need to know if it is still possible to load the PNG images with the alpha channel onto a surface from a resource. My current thinking is to get the resource into an IStream and then use D3DXCreateTextureFromFileInMemory. Would that work? Is there a better way? Also, any good tutorial on 2D in DirectGraphics (or whatever it's called now) would be nice. Thanks.
  5. turned out to just be a depth buffer issue. I managed to fix it and i'm thankfull for the help.
  6. Here is the problem: here is what it looks like up close Any idea what cuases this problem? how can i fix it?
  7. I finally found a table that gives me what I need in order to create the proper data types in Access. I knew that Long int was 32 bits and I certainly don't need that much. In some cases I need no more than a C Byte (8 bits). I was wasting a lot of space with using all long integers.
  8. I am using an SQL statement to create a table in Access. The problem I am having is that the table keeps creating "Long Integers" instead of just "Integers". the SQL statement is in the format of "tc2_version Integer, tc2_option Integer,....." (the ..... aren't there, but it's a long list). I have no need for the Long Integer and would prefer to just use an Interger. Any idea how to make just "Integer" appear in the table instead of "Long Integer"?
  9. turns out, my problem was that i was waiting for the connection right after issuing the PORT command and in actuality, the server does not attempt to connect until after the RETR command (or some command needing the data port) is issued.
  10. = client = ftp server I see what you're saying, but then let me ask you this, the ftp server also resides on the LAN (it's IP address is, so I'm not going outside of the LAN for the connection (infact, connecting to for the command stream works fine). I will certainly give your suggestion a try, but what if the ftp is on a LAN not connected to the internet? Then is the only IP address.
  11. I'm having trouble getting the data port on an ftp connection working. I issue the PORT command and get a succesfull response, but the FTP doesn't seem to attempt to connect to the data port on the client. I know the PORT command is of the format PORT 10,0,0,212,3,4 where the first four are the IP and the last two make up the port (3*256+33). I create a socket and put it into a listening state, but no connection is ever established. Does the FTP server only create the connection once a command requiring the data port is issued? In other words, does the PORT command just tell the server where to make the connection when needed? I thought the PORT command created the data channel. In my code I issue the PORT command then wait for a connection then issue the RETR command; however, I never get a connection. here is the code [C#] localSocket = new Socket( AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp ); localSocket.Bind( new IPEndPoint( IPAddress.Parse( "" ), 8*256+29 ) ); localSocket.Listen( 50 ); command = "PORT 10,0,0,212,8,29"+CRLF; m_cmdSocket.Send( Encoding.ASCII.GetBytes( command ), command.Length, 0 ); ReadCommandReply(); while( !localSocket.Connected ) { Console.WriteLine( "waiting..." ); } I never get past that wait loop. ReadCommandReply() gives me a "PORT command successfull, but I never get a connection. I didn't put this in the .Net forum because this is really a general FTP protocall question although I may have messed up the source code. I'm trying to make sure I understand how PORT works.
  12. Mike

    MSDE Question...

    Perhaps there is a simplier solution I'm missing, I am using ADO.Net for creating all of the tables and such, the only problem that I'm having is that I do not know how to use ADO.Net to create the actual database. I know all that I need to know once I've connected to the database. If there is a way via code to create the database on the server, i'll be set.
  13. Mike

    MSDE Question...

    Would it be possible to have the Windows installer run a command line tool to create the database on the server after MSDE has finished installing? If so, what would that command be (in generic terms)?
  14. I'm wondering how one goes about creating a database with MSDE. An application I'm currently working on uses Access and I would like to switch to MSDE. I understand how to connect to one of the databases that are there by default, and I know how to create a new database on the server from within Visual Studio .Net; but how do I create a new database otherwise? The reason I'm asking is that the application will be installed on various client's computers and I will not be able to go to ever client's computer, install VS.Net and create the database. Is there someway through code to create the Database on the server (using .Net), or is there someway to have MSDE create the database durring installation?
  15. I've got strings that are two digits seperated by any number/type of white space(s). For example "99 \t\t 104" (\t = tab) I know that I can use "\d+\s+\d+" to represent such a string. Now what I'm wondering is what is the proper way to split up the string into each of it's components in C#? I know i could use Regex.Split( input, "\s+" ) to split it inbetween the letters, but there seems to me that there should be a better way to give C# a regular expression, tell it to find a match (which can be down with Regex.Match) and then find out exactly what each part of the match is. I would think the Match returned by Regex.Match would have this information, but where? Thanks.
  • 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!